﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace HengTong.DataAccess.Migrations
{
    /// <inheritdoc />
    public partial class 通知消息新增单据编码 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ReceiverId",
                table: "SysNotification");

            migrationBuilder.DropColumn(
                name: "SenderId",
                table: "SysNotification");

            migrationBuilder.RenameColumn(
                name: "SenderName",
                table: "SysNotification",
                newName: "Sender");

            migrationBuilder.RenameColumn(
                name: "ReceiverName",
                table: "SysNotification",
                newName: "Receiver");

            migrationBuilder.AddColumn<string>(
                name: "BillCode",
                table: "SysNotification",
                type: "nvarchar(128)",
                maxLength: 128,
                nullable: true);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "BillCode",
                table: "SysNotification");

            migrationBuilder.RenameColumn(
                name: "Sender",
                table: "SysNotification",
                newName: "SenderName");

            migrationBuilder.RenameColumn(
                name: "Receiver",
                table: "SysNotification",
                newName: "ReceiverName");

            migrationBuilder.AddColumn<Guid>(
                name: "ReceiverId",
                table: "SysNotification",
                type: "uniqueidentifier",
                nullable: true);

            migrationBuilder.AddColumn<Guid>(
                name: "SenderId",
                table: "SysNotification",
                type: "uniqueidentifier",
                nullable: true);
        }
    }
}
